<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div id="sidebar">

	<!-- Search -->
	<div class="box search">
		<h2>
			<spring:message code="quicksearch" />
			<span></span>
		</h2>
		<div class="box-content">
			<form:form method="GET" action="search" commandName="query">
				<label><spring:message code="keyword" /></label>
				<form:input path="keyWord" cssClass="field" style="width: 137px;" />
				<input type="submit" class="search-submit"
					style="float: left; margin: -7px 0 0 0; position: absolute; left: 303px; top: 154px;"
					value="<spring:message
						code="search" />" />
				<input type="hidden" name="searchType" value="quick" />

				<a href="<c:url value="/search"/>" class="bul"><spring:message
						code="advancesearch" /></a>
			</form:form>
		</div>
	</div>
	<!-- End Search -->

	<!-- Product Type Categories -->
	<div class="box categories">
		<h2>
			<spring:message code="producttype" />
			<span></span>
		</h2>
		<div class="box-content">
			<ul>
				<c:forEach var="productType" items="${allProductType}"
					varStatus="status">
					<li <c:if test="${status.last}">class="last"</c:if>><a
						href="search?searchType=advance&productType=${productType.nameUrl}">${productType.name}</a></li>
				</c:forEach>
			</ul>
		</div>
	</div>
	<!-- End Categories -->

	<!-- Producer Categories -->
	<div class="box categories">
		<h2>
			<spring:message code="producer" />
			<span></span>
		</h2>
		<div class="box-content">
			<ul>
				<c:forEach var="producer" items="${allProducer}" varStatus="status">
					<li <c:if test="${status.last}">class="last"</c:if>><a
						href="search?searchType=advance&producerName=${producer.nameUrl}">${producer.name}</a></li>
				</c:forEach>
			</ul>
		</div>
	</div>
	<!-- End Categories -->

	<!-- Fashion news -->
	<div class="box news">
		<h2 style="background: rgb(58, 96, 214);">
			<spring:message code="fashionnews" />
		</h2>
		<div class="box-content">
			<ul id="list-news"></ul>
		</div>
	</div>
	<!-- End Fashion news -->
</div>